package com.cyh.ebptasywar.common.quart;

import com.cyh.ebptasywar.job.BaseJob;
import com.cyh.ebptasywar.logic.PromtWorkCellLogic;
import com.cyh.ebptpubjar.ebptlogger.EbptLogger;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

@DisallowConcurrentExecution
public class QuartzWorkJob extends BaseJob {
    @Autowired
    private PromtWorkCellLogic promtWorkCellLogic;


    /**
     * 执行任务
     * @param jobExecutionContext
     * @throws JobExecutionException
     */
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        EbptLogger.initEbptLogger(null);
        EbptLogger.info(getClass(),"PromtWorkJob is working ,Time:[{}]",System.currentTimeMillis());
        EbptLogger.info(getClass(),"[{}]",this.getClass());
        try {
            Thread.sleep(5000);
        }catch (Exception e){

        }
        EbptLogger.info(getClass(),"PromtWorkJob is end ,Time:[{}]",System.currentTimeMillis());
        EbptLogger.endEbptLogger();
    }
}


